package com.vm.dao.system;

import java.util.List;

import java.util.Map;

import com.vm.dao.BaseDAOImpl;
import com.vm.entity.CodeClass;


public class CodeClassDAOImpl extends BaseDAOImpl<CodeClass, String> implements ICodeClass {

	public  CodeClassDAOImpl(){
		setEntityClass(CodeClass.class);
	}
	
	public List<CodeClass> findByClassCd(String classCd){
		Object[] params = new Object[] { classCd };
		List<CodeClass> list = super.findByHql("from CodeClass where classCd=?", params);
		return list;
	}
	
	public List<CodeClass> findAllCodeClass() {
		List<CodeClass> list = super.findByHql("from CodeClass", new Object[] {});
		return list;
	}

	public void deleteCode(String classCd){
		Object[] params = new Object[] { classCd };
		super.deleteByHql("delete from Code where classCd=?", params);
	}
	
}
